package com.yanqu.road.entity.enums.washe;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 写在这里的类型都是可以用的，不能用的要注释掉
 */
public enum eWasheSceneType {

    Empty(1, "空"),
    ZhaoCaiJinBao(2, "招财进宝"), // 橙色额外加分|每次刷新数量|关联颜色|0
    LuoGuXuanTian(3, "锣鼓喧天"), // 初始分数|每步加分|0|0
    HuoYaoKuangHuan(4, "火药狂欢"), // 初始个数|稳定个数|掉落概率千分比|数量上限
    JieJieGao(5, "节节高"), // 首个水晶花加分|递增分|稳定数量|关联颜色
    GuiKeZhanBu(6, "龟壳占卜"), // 每次刷新数量|关联颜色|随机消除基础元素数量|0
    BaiBaoXiang(7, "百宝箱"), // 获得技能进度|稳定数量|掉落概率千分比|掉落上限
    HongYouQingHua(8, "红釉青花"), // 初始数量|稳定数量|掉落概率千分比|掉落上限
    DianShanLeiMing(9, "电闪雷鸣"), // 初始数量|稳定数量|增加步数|0
    YiBenWanLi(10, "一本万利"), // 增加倍数|稳定数量|0|0
    DunHuangFeiTian(11, "敦煌飞天"), // 稳定刷新数量|0|0|0
    WuCaiBinFen(12, "五彩缤纷"), // 加分最小值|加分最大值|0|0
    YanHuoKuangHuan(13, "烟火狂欢"), // 稳定数量|掉落数量上限|替换概率千分比|0

    ;

    private static Map<Integer, eWasheSceneType> cacheMap = new ConcurrentHashMap<>();

    static {
        for (eWasheSceneType type : eWasheSceneType.values()) {
            cacheMap.put(type.getType(), type);
        }
    }

    public static List<Integer> getSceneIdNewList() {
        List<Integer> list = new ArrayList<>();
        for (eWasheSceneType sceneType : eWasheSceneType.values()) {
            list.add(sceneType.getType());
        }
        return list;
    }

    public static eWasheSceneType getEnumByType(int value) {
        return cacheMap.get(value);
    }

    private int type;
    private String desc;

    eWasheSceneType(int type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public int getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }

}
